package com.louis.di_map;

import java.util.List;
import java.util.Map;

/**
 * @author XRY
 * @date 2023年06月23日12:36
 */
public class Student {
    private String sname;
    private String sid;
    //一个学生可能对应多个老师
    private Map<String, Teacher> teacherMap;
    //添加课程列表
    List<Lesson> list;

    public List<Lesson> getList() {
        return list;
    }

    public void setList(List<Lesson> list) {
        this.list = list;
    }

    public Map<String, Teacher> getTeacherMap() {
        return teacherMap;
    }

    public void setTeacherMap(Map<String, Teacher> teacherMap) {
        this.teacherMap = teacherMap;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public void learn(){
        System.out.println("学生姓名" + sname + "----" + "学号" + sid);
        System.out.println(teacherMap);
    }

    @Override
    public String toString() {
        return "Student{" +
                "sname='" + sname + '\'' +
                ", sid='" + sid + '\'' +
                ", teacherMap=" + teacherMap +
                ", list=" + list +
                '}';
    }
}
